package com.lanou.service.Impl;

import com.lanou.entity.ConsultantLevel;
import com.lanou.mapper.ConsultantLevelMapper;
import com.lanou.service.ConsultantLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ConsultantLevelServiceImpl
 * @Description TODO
 * @Author chenzhaobao
 * @Date 2025年08月13日 10:55
 * @Version 1.0
 */
@Service
public class ConsultantLevelServiceImpl implements ConsultantLevelService {

    @Autowired
    private ConsultantLevelMapper consultantLevelMapper;

    @Override
    public int addConsultantLevel(ConsultantLevel consultantLevel) {
        return consultantLevelMapper.insertConsultantLevel(consultantLevel);
    }

    @Override
    public int deleteConsultantLevelById(Integer id) {
        return consultantLevelMapper.deleteConsultantLevelById(id);
    }

    @Override
    public int updateConsultantLevel(ConsultantLevel consultantLevel) {
        return consultantLevelMapper.updateConsultantLevel(consultantLevel);
    }

    @Override
    public ConsultantLevel getConsultantLevelById(Integer id) {
        return consultantLevelMapper.selectConsultantLevelById(id);
    }

    @Override
    public List<ConsultantLevel> getAllConsultantLevels() {
        return consultantLevelMapper.selectAllConsultantLevels();
    }
}
